<?php

/**
 * Home actions.
 *
 * @package    utility
 * @subpackage Home
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
 */
class HomeActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    //$this->forward('default', 'module');
	$buildings = BuildingPeer::GetVacantBuilding();
	if ($buildings) $this->vacant_buildings = count($buildings);
	else $this->vacant_buildings=0;
	
	$bills = BillingPeer::GetUnpaidBill();
	if ($bills) $this->unpaid_bills= count($bills);
	else $this->unpaid_bills=0;

	
  }
  
  public function executeViewUnpaidBills(sfWebRequest $request)
  {
	$bills = BillingPeer::GetUnpaidBill();
	if ($bills) $this->bills = $bills;
  } // END - executeViewUnpaidBills
  
  public function executeViewVacantBuildings(sfWebRequest $request)
  {
	$buildings = BuildingPeer::GetVacantBuilding();
	if ($buildings) $this->buildings = $buildings;
  } // end - executeViewVacantBuildings
  
  
}// END - Class 
